package com.six.work.servicesImpl;


import com.six.work.entity.*;
import com.six.work.mapper.CompanyMapper;
import com.six.work.services.CompanyServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyServicesImpl  implements CompanyServices {
    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public List<Company> findAllCompany() {
        List<Company> list = companyMapper.findAllCompany();
        return list;
    }

    //前端页面Aworkcompany连数据库
    @Override
    public List<Company> findAllCompany1() {
        List<Company> list = companyMapper.findAllCompany1();
        return list;
    }

    @Override
    public Integer DelCompanyByID(Integer company_id) { return companyMapper.DelCompanyByID(company_id); }

    @Override
    public List<CompanyView> findCompanyByName(String companyName) {
        return companyMapper.findCompanyByName(companyName);
    }

    @Override
    public List<CompanyView> finComByStateAndcomName(String companyName, Integer state_id) {
        return companyMapper.finComByStateAndcomName(companyName,state_id);
    }

    @Override
    public List<Company> findCompanyManageByName(String comName) {
        return companyMapper.findCompanyManageByName(comName);
    }

    @Override
    public String updateComState(Integer company_id) {
        return companyMapper.updateComState(company_id);
    }

    @Override
    public String updateComState1(Integer company_id) {
        return companyMapper.updateComState1(company_id);
    }

    @Override
    public Company UserLogin(String company_number) {
        return companyMapper.UserLogin(company_number);
    }

    @Override
    public Integer insertCompany(Company company) {
        return companyMapper.insertCompany(company);
    }

    @Override
    public Company SelectComByID(Integer company_id) {
        return companyMapper.SelectComByID(company_id);
    }

    //搜索job_add
    @Override
    public List<Company> findCompanyByAdd(String job_add) {
        return companyMapper.findCompanyByAdd(job_add);
    }

    //搜索company_type
    @Override
    public List<Company> findCompanyByType(String company_type) {
        return companyMapper.findCompanyByType(company_type);
    }


    //搜索company_scale
    @Override
    public List<Company> findCompanyByScale(String company_scale) {
        return companyMapper.findCompanyByScale(company_scale);
    }

//企业认证
   @Override
   public Company SelectCompanyByID(Integer company_id) {

        return companyMapper.SelectCompanyByID(company_id);
    }
    @Override
    public Integer updateCompany(Company company) {

        return companyMapper.updateCompany(company);
    }

    @Override
    public List<Company> findComType(){
        return companyMapper.findComType();
    }

    @Override
    public List<Company> findComAdd(){
        return companyMapper.findComAdd();
    }



    //前端页面间Aworkcompany传值到positionItem(试)
    @Override
    public List<CompanyAndPositionView> SelectComByID2(Integer company_id) {
        return companyMapper.SelectComByID2(company_id);
    }

    //可视化
    @Override
    public List<Company> findAllCom() {
        List<Company> list = companyMapper.findAllCom();
        return list;
    }

    //今日新增
    @Override
    public Integer FindTodayCom() {
        return companyMapper.FindTodayCom();
    }

    @Override
    public Integer FindMonthCom() {
        return companyMapper.FindMonthCom();
    }

    @Override
    public  List<CompanyType> SumComType() {
        return companyMapper.SumComType();
    }


    @Override
    public List<Company> top10Com(){
        return companyMapper.top10Com();
    }

    @Override
    public List<CompanyAdd> findAddCom() { return companyMapper.findAddCom(); }
}
